# -*- coding: utf-8 -*-
import maya.cmds as cmds
def Check_CamName():
	file_path = cmds.file(q=True, sceneName=True)
	file_name = file_path.split('/')[-1]
	file_name= file_name.split('_')
	file_path = cmds.file(q=True, sceneName=True)
	file_name = file_path.split('/')[-1]
	file_name = file_name.split('_')
	cameras = cmds.ls(type='camera')
	for camera in cameras:
		try:
			if not cmds.camera(camera, query=True, startupCamera=True):
				cmds.rename(camera, file_name[0] + "_" + file_name[1] + "_cam")
				return("YES")
		except:
			return("NO")



	'''		
	CamShapeTmps = ['front' , 'persp' , 'side' , 'top']
	AllCamShapes = cmds.listCameras()
	ListCam = list ( set ( AllCamShapes ) ^ set ( CamShapeTmps ) )
	if len (ListCam ) == 1 :
		cmds.rename(ListCam[0], file_name[0]+"_"+file_name[1]+"_cam")
		return("YES")
	else:
		return("NO")'''